import { _ as a } from "./attr-item.vue_vue_type_script_setup_true_lang.ABkxhIcO.js";
import { D as c } from "./index.C1xHoEFy.js";
import { p as m, c as t, h as b } from "./index.Bbfhrq76.js";
import { j as i, f as l } from "./vendor.CF2kwqqq.js";
let n = [
  {
    parameter: "put-db-record-dcbp-service",
    message: "请选择放置数据库记录dcbp服务"
  },
  {
    parameter: "put-db-record-record-reader",
    message: "请选择放置数据库记录读取器"
  },
  {
    parameter: "db-type",
    message: "请选择数据库类型"
  },
  {
    parameter: "put-db-record-statement-type",
    message: "请选择存储策略"
  }
];
const K = () => ({ name: ["org.apache.nifi.processors.standard.PutDatabaseRecord_2_0"], excludeKeys: [
  "put-db-record-record-reader",
  "db-type",
  "put-db-record-dcbp-service",
  "put-db-record-statement-type",
  "put-db-record-table-name",
  "web预留（自动填入）"
], selfFormColumn: [
  {
    assignKey: "put-db-record-dcbp-service",
    tag: a,
    ":data": "formData.config.properties"
  },
  {
    assignKey: "put-db-record-record-reader",
    tag: a,
    ":data": "formData.config.properties"
  },
  {
    assignKey: "db-type",
    tag: a,
    ":data": "formData.config.properties"
  },
  // {
  //   prop: "config.properties.put-db-record-dcbp-service",
  //   assignKey: "put-db-record-dcbp-service",
  //   tag: ElSelect,
  //   filterable: true,
  //   placeholder: "",
  // },
  // {
  //   assignKey: "put-db-record-record-reader",
  //   tag: ElSelect,
  //   prop: "config.properties.put-db-record-record-reader",
  //   placeholder: "",
  // },
  // {
  //   assignKey: "db-type",
  //   tag: ElSelect,
  //   prop: "config.properties.db-type",
  //   placeholder: "",
  // },
  {
    assignKey: "put-db-record-statement-type",
    prop: "config.properties.put-db-record-statement-type",
    tag: i,
    label: "存储策略",
    placeholder: "",
    cls: [
      { value: "INSERT", label: "追加" },
      { value: "UPSERT", label: "融合" }
    ]
  },
  {
    tag: c,
    ":formData": "formData",
    prop: "config.properties['put-db-record-dcbp-service']",
    propOutput: "config.properties['web预留（自动填入）']",
    isFormElem: !1,
    setup({ params: r }) {
      return {
        disabled: r.step.value === "running"
      };
    },
    ":disabled": "disabled"
  }
], hooksSubmit: (r, d) => {
  var p;
  let e = (p = d.event.form) == null ? void 0 : p.data.value[r.id].config.properties;
  m(e, n);
  let { databaseType: s, tableName: o } = JSON.parse(
    e["web预留（自动填入）"]
  );
  s || t("请选择数据源"), o || t("请选择表"), e["db-type"] && b[e["db-type"]] !== s && t("数据库获取数据库类型应与数据源类型一致"), l(e, "put-db-record-table-name", o);
} });
export {
  K as default
};
